﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Dominio
{
    public class FabricaIndexador
    {
        private static string indexConfigured;
        private static Indexador index = null;

        public static Indexador getIndexador()
        {
            if (index == null)
            {
                indexConfigured = "Lucene.NET";
                    //ConfigurationSettings.AppSettings["MotorIndexador"];  
                if (indexConfigured == "Lucene.NET")
                    index = new LuceneIndexador();
                else if (indexConfigured == "SQLServer")
                    index = new SQLIndexador();
            }
            return index;
        }
    }
}
